<template>
    <div class="header">
        <div class="header-left">
            <span class="iconfont">&#xe606;</span>
        </div>
        <div class="header-input">
            <span class="iconfont">&#xe61e;</span>
            输入城市/景点/游玩主题
        </div>
        <router-link to="/City">
            <div class="header-right">
                {{this.city}}
                <span class="iconfont">&#xe64a;</span>
            </div>
        </router-link>
    </div>
</template>

<script>
import { mapState } from "vuex"
export default {
  name: "HomeHeader",
  data(){
      return{
           
      } 
  },
  computed:{
      ...mapState(["city"])
  },
  props:{
      
  }
};
</script>

<style lang="stylus" scoped>
@import '~styles/variable';

.header {
    display :flex;
    line-height :.86rem;
    background-color :$bgColor;
    color :#fff;
    .header-left {
        width :.64rem;
        float :left;
        text-align :center;
    }
    .header-right{
        color :white;
        min-width :1.04rem;
        float :right;
        text-align :center;
        font-size:.12rem;
    }
    .header-input{
        flex :1
        height :.64rem;
        margin-top :.12rem;
        background :#fff;
        border-radius :.1rem;
        margin-left :.12rem;
        position :relative;
        color :#ccc;
        line-height :.64rem;
        text-align :center;
        font-size :.16rem;
    }
}
</style>